<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
        <button :disabled='type'>{{msg}}</button>
    </div>
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                msg: 5,
                type: true
            },
            mounted() {
                var t1 = setInterval(() => {
                    this.msg--
                        if (this.msg == 0) {
                            clearInterval(t1)
                            this.msg = '确定'
                            this.type = false
                        }
                }, 1000);
            },
        })
    </script>
</body>

</html>